Mathematica Data Visualization by Saquib Nazmus

Mathematica Data Visualization by Saquib Nazmus

Author:Saquib, Nazmus [Saquib, Nazmus]
Language: eng
Format: mobi, azw3
Publisher: Packt Publishing
Published: 2014-09-24T23:00:00+00:00


Introduction to isocontours

Let's start with a 2D scalar field for the sake of simplicity. We will create a mock scalar field in Mathematica, and visualize the isocontours with the field to understand what an isocontour really means. The code for the 2D scalar field is as follows:

(* 2d scalar field visualization *)

(* create a scalar field of the form {x, y, x^2+y^2}, the scalar value at each coordinate is x^2+y^2. *)

sc2d = Flatten[ Table[{x, y, x^2+y^2}, {x,1,8},{y,1,5,0.5} ], 1 ];

(* divide by the maximum value of the scalar quantity to scale the other scalar values to [0, 1] *)

sc2d[[ ;;, 3 ]] = sc2d[[ ;;, 3 ]] / Max[ sc2d[[ ;;, 3 ]] ];



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.